import Vue, { KeepAlive } from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/loginPage'
  },
  {
    path: '/elem',
    name: 'elementView',
    component: () => import('../views/element/elementView.vue')
  },
  {
    path: '/emp',
    name: 'emp',
    component: () => import('../views/tlias/empView.vue')
  },
  {
    path: '/depts',
    name: 'depts',
    component: () => import('../views/tlias/deptsView.vue')
  },
  {
    path: '/loginPage',
    name: 'loginPage',
    component: () => import('../views/endProject/loginView.vue')
  },
  {
    path: '/register',
    name: 'register',
    component: () => import('../views/endProject/registerView.vue')
  },
  {
    path: '/indexPage',
    name: 'indexPage',
    component: () => import('../views/endProject/indexView.vue')
  },
  {
    path: '/evaluate',
    name: 'evaluate',
    component: () => import('../views/endProject/evaluationView.vue')
  },
  {
    path: '/evaluateResult',
    name: 'evaluateResult',
    component: () => import('../views/endProject/evaluationResultView.vue')
  },
  {
    path: '/volunteer',
    name: 'volunteer',
    component: () => import('../views/endProject/volunteerView.vue')
  },
  {
    path: '/voluntary',
    name: 'voluntary',
    component: () => import('../views/endProject/voluntaryView.vue')
  },
  {
    path: '/managerset',
    name: 'managerset',
    component: () => import('../views/endProject/managersetView.vue')
  },
  {
    path: '/serviceIndex',
    name: 'serviceIndex',
    component: () => import('../views/endProject/Service/ServiceView.vue')
  },
  {
    path: '/HKView',
    name: 'HKView',
    component: () => import('../views/endProject/HKView.vue'),
    meta: {
      KeepAlive: false,
    }
  },
  {
    path: '/hospital',
    name: 'hospital',
    component: () => import('../views/endProject/OldMenView.vue')
  },,
  {
    path: '/tourism',
    name: 'tourism',
    component: () => import('../views/endProject/tourismView.vue')
  },
  
  {
    path: '/OrderPage',
    name: 'OrderPage',

    children: [
      {
        path: '/drinks',
        name: 'drinks',
        component: () => import(/* webpackChunkName: "about" */ '../views/endProject/drinksView')
      },
      {
        path: '/order',
        name: 'order',
        component: () => import(/* webpackChunkName: "about" */ '../views/endProject/orderView.vue')
      },
      {
        path: '/record',
        name: 'record',
        component: () => import(/* webpackChunkName: "about" */ '../views/endProject/orderRecord.vue')
      },
      {
        path: '/cart',
        name: 'cart',
        component: () => import(/* webpackChunkName: "about" */ '../views/endProject/cartView.vue')
      },{
        path: '/',
        name: '',
        component: () => import(/* webpackChunkName: "about" */ '../views/endProject/orderView')
      }

    ]
    ,
    component: () => import(/* webpackChunkName: "about" */ '../views/endProject/indexOrderPage.vue')
  },



]

const router = new VueRouter({
  routes
})

export default router
